import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqPetArenaInfoHelper } from "./SeqPetArenaInfoHelper";
import { SEntityId } from "../Public/SEntityId";
type int = number;
//class SPetArenaInfos
    
    export  class SPetArenaInfos extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SPetArenaInfos();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.targetPage);
            arg1.writeInt(this.totalPage);
            arg1.writeInt(this.searchType);
            SeqPetArenaInfoHelper.write(arg1, this.petArenaInfos);
            this.entityId.__write(arg1);
            arg1.writeString(this.name);
            arg1.writeInt(this.win);
            arg1.writeBool(this.countReward);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.targetPage = arg1.readInt();
            this.totalPage = arg1.readInt();
            this.searchType = arg1.readInt();
            this.petArenaInfos = SeqPetArenaInfoHelper.read(arg1);
            this.entityId = new SEntityId();
            this.entityId.__read(arg1);
            this.name = arg1.readString();
            this.win = arg1.readInt();
            this.countReward = arg1.readBool();
            return;
        }

        public /* const */_type: int=12401;

        public /* var */targetPage: int;

        public /* var */totalPage: int;

        public /* var */searchType: int;

        public /* var */petArenaInfos: Array<any>;

        public /* var */entityId: SEntityId;

        public /* var */name: string;

        public /* var */win: int;

        public /* var */countReward: Boolean;

        public static /* var */_regist: SPetArenaInfos;
    }

            SPetArenaInfos._regist = new SPetArenaInfos(true);
        